package Test1;

import java.util.Scanner;

public class Test2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
           int x = scanner.nextInt();
           int y = scanner.nextInt();
           int p = x % 4;
           x -= p;
           int sum1 = x/2+(p==3?2:p);
          x += p;
          p = y%4;
          y -= p;
        System.out.println(y / 2 * x + (p == 3 ? 2 * sum1 + (x - sum1) : p * sum1));
    }

    public static void main5(String[] args) {
        System.out.println(StrToInt("-2147483648"));
    }
    //数字转字符串
    public static int StrToInt(String str) {
        //判断是否首字母是正负号
        int i = 0;
        boolean flog = true;
        if (str.length() == 0){
            return 0;
        }
        if(str.charAt(0) == '+' || str.charAt(0) == '-' ) {
            i++;
            if(str.charAt(0) == '-'){
                flog = false;
            }
        }else if (str.charAt(0) <48 || str.charAt(0)>57){
            return 0;
        }
        //查看是否包含非0~9的字符
        long sum = 0;
        for (; i < str.length(); i++) {
            char ch = str.charAt(i);
            if(ch < 48 || ch >57){
                return 0;
            }
            ch = (char) (ch-48);
            if(i == 1 && !flog){
                sum*=-1;
            }
            if(!flog){
                sum = sum*10 - ch;
            }else {
                sum = sum*10 + ch;
            }
            if (sum > Integer.MAX_VALUE || sum < Integer.MIN_VALUE) {
                return 0;
            }
        }
        return (int) sum;
    }

    public static void main6(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String ch = scanner.next();
        switch (ch){
            case "M":
                System.out.println("星期一");
                break;
            case "T":
                ch = scanner.next();
                if(ch .equals("u")){
                    System.out.println("星期二");
                }else {
                    System.out.println("星期四");
                }
                break;
            case "W":
                System.out.println("星期三");
                break;
            case "F":
                System.out.println("星期五");
                break;
            case "S":
                ch = scanner.next();
                if(ch .equals("u")){
                    System.out.println("星期日");
                }else {
                    System.out.println("星期六");
                }
                break;
        }
    }
    public static void main2(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            int x = scanner.nextInt();
            int y = scanner.nextInt();
            //行
            //记录第一行的蛋糕数量
            int sum1 = 0;
            //看图可以发现规律,如果第一行值是sum1那么第三四行的值就是x-sum1,处于互补关系
            int sum2 = 0;
            //记录蛋糕总数
            int sum = 0;
            //用于判断
            //
            int count = 0;
            //这个for循环是求第一个sum1的值
            for (int i = 0; i < x ; i++) {
                count++;
                //为1就count++,为2就count++
                if(count == 1 || count == 2){
                    sum1++;
                }
                //count为3,不加加,什么也不做
                //count为4,不加加,将count置为0
                if (count == 4){
                    count = 0;
                    //置为0后count又从0开始计数
                }
            }
            //求的是sum2的值
            sum2 = x-sum1;
            count = 0;
            for (int i = 0; i < y; i++) {
                //以就是跟上述一样的逻辑
                count++;
                if(count == 1 || count == 2){
                    //此时加的是sum1
                    //count为1.2时才+sum1
                    sum+=sum1;
                }

                if(count == 3||count == 4){
                    //当count为3,4时才+sum2
                    sum+=sum2;
                }
                if (count == 4){
                    //依旧是4个值一个循环
                    count = 0;
                }
            }
            //此时就是所有蛋糕的值

            System.out.println(sum);
        }

    }
}
